package day015.map;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class MapDemo {
    public static void main(String[] args) {
        Map<String, String> hm = new HashMap<>();

        hm.put("文章", "马伊琍");
        hm.put("谢霆锋", "王菲");
        hm.put("李亚鹏", "王菲");

        System.out.println(hm.remove("谢霆锋"));
        System.out.println(hm.get("李亚鹏"));

        Set<String> keySet = hm.keySet();
        for (String key : keySet) {
            System.out.println(key);
        }

        System.out.println(hm.containsKey("李亚鹏"));
        System.out.println(hm);
    }
}
